// routes/userRoutes.js
const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController');
const authenticateToken = require('../middleware/auth');

// 公共路由
router.post('/register', userController.registerUser);
router.post('/login', userController.loginUser);

// 需要认证的路由
router.get('/me', authenticateToken, userController.getCurrentUser);

module.exports = router;